.tk-totals-table {
  width: fit-content;
  width: -moz-fit-content;

  &__child-row,
  &__child-summary-row,
  &__title-row--collapsed {
    background: var(--backgroundPrimary);

    &:hover {
      background-color: var(--backgroundTableRowSelected);
    }

    body.theme-classic &:hover {
      color: #ffffff;
    }
  }

  &__header-row,
  &__footer-row {
    font-size: 0.85rem;

    &--expense {
      background-color: var(--tk-ive-report-negative-color);
    }

    &--income {
      background-color: var(--tk-ive-report-positive-color);
    }

    .tk-monthly-totals-row {
      &__title-cell {
        background: inherit;
        padding-left: 0.5rem;
      }
    }
  }

  &__title-row {
    border-top: 1px solid var(--tk-ive-report-border-color);

    .tk-monthly-totals-row {
      &__title-cell {
        padding-left: 0.5rem;
      }

      &__data-cell {
        font-weight: bold;
      }
    }
  }

  &__child-row {
    border-top: 1px solid var(--tk-ive-report-border-color);

    .tk-monthly-totals-row {
      &__title-cell {
        background: inherit;
        font-weight: normal;
        padding-left: 1rem;
      }
    }
  }

  &__child-summary-row {
    border-top: 2px solid var(--tk-ive-report-border-color);

    .tk-monthly-totals-row {
      &__title-cell {
        background: inherit;
        padding-left: 1rem;
      }

      &__data-cell {
        font-weight: bold;
      }
    }
  }
}
